package com.derbysoft.synxisadapter.commons.model;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;

@Entity
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Channel {
    @Id
    @Column(length = 50)
    private String passport;

    @Column(nullable = false, length = 250)
    private String name;

    @Column(nullable = false, length = 20)
    private String code;

    @Column(nullable = false, length = 20)
    private String id;

    @Column(length = 20)
    private String iataNumber;

    @Enumerated(EnumType.STRING)
    @Column(nullable = false)
    private TaxPolicy taxPolicy;

    @Column(nullable = false, columnDefinition = "bool")
    private boolean inclusiveTaxRate;

    @Column(nullable = false, length = 40)
    private String userName;

    @Column(nullable = false, length = 40)
    private String password;


    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public boolean isInclusiveTaxRate() {
        return inclusiveTaxRate;
    }

    public void setInclusiveTaxRate(boolean inclusiveTaxRate) {
        this.inclusiveTaxRate = inclusiveTaxRate;
    }

    public TaxPolicy getTaxPolicy() {
        return taxPolicy;
    }

    public void setTaxPolicy(TaxPolicy taxPolicy) {
        this.taxPolicy = taxPolicy;
    }

    public String getPassport() {
        return passport;
    }

    public void setPassport(String passport) {
        this.passport = passport;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getIataNumber() {
        return iataNumber;
    }

    public void setIataNumber(String iataNumber) {
        this.iataNumber = iataNumber;
    }
}
